package com.ffcs.web.daos.implementations;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import com.ffcs.web.model.entity.Message;

@Repository
public class MessageDao extends BaseDaoHibernateImpl<Message, Integer>{

	@Autowired
	private JdbcTemplate jdbcTemplate;
	
	public List<Message> getMessage(String sendType) {
		String sql="select * from wechat_message where sendType=0 or sendType="+sendType;
		return jdbcTemplate.query(sql, new BeanPropertyRowMapper<Message>(Message.class));
	}

}
